package com.example.demo.server;

import com.example.demo.mapper.afterMapper;
import com.example.demo.model.Commodity;
import com.example.demo.model.ReservationVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class afterServer {
    @Autowired(required = false)
    // @Autowired(required=false)： 表示忽略当前要注入的bean，如果有直接注入，没有跳过，不会报错
    public afterMapper afterMapper;

    //查询所有商品
     public List<Commodity> seleAll(){
        return afterMapper.seleAll();
    };
    //查询订单
    public List<ReservationVo> selRese(){
        return afterMapper.selRese();
    }
    //修改状态
    public int updStaOne(Integer id){
        return afterMapper.updStaOne(id);
    };
    public int updStaTwo(Integer id){
        return afterMapper.updStaTwo(id);
    };
}
